System and method of automatic generation and insertion of analytic tracking codes

ABSTRACT

A system and method to automatically generate and insert a tracking code may include receiving at a web server, from a requesting computing device, a webpage access request associated with a domain; in response to receiving the webpage access request; accessing a configuration file for the domain; generating an analytics tracking code based on data stored in the configuration file; accessing the webpage from a storage device; modifying the webpage to include the analytics tracking code; and transmitting, from the web server, the modified webpage to the requesting computing device.

RELATED-APPLICATIONS

This patent application is a continuation of U.S. patent applicationSer. No. 14/040,344, filed Sep. 27, 2013, which claims the benefit ofpriority, under 35 U.S.C. § 119(e), to U.S. Provisional PatentApplication Ser. No. 61/707,692, titled “SYSTEM AND METHOD OF AUTOMATICGENERATION AND INSERTION OF ANALYTIC TRACKING CODES,” filed on Sep. 28,2012, both of which are incorporated by reference in their entirety.

TECHNICAL FIELD

This patent document pertains generally to web analytics, and moreparticularly, but not by way of limitation, to a system and method ofautomatic generation and insertion of analytic tracking codes.

BACKGROUND

When a small business owner (or other user) decides to create a websitethe owner often would like to track the behavior or information aboutusers of the website. The process of collecting and reporting the datais traditionally known as analytics. The analytics might include storingthe path a user takes through a website to help the owner improve thedesign on the website. The analytics might also track what a user is“looking” at or how long a user stays on a webpage of the website.Analytics may also include tracking where the requesting user's deviceis located (e.g., geographic analytics) or how the user arrived at thewebpage (e.g., via a search results page).

BRIEF DESCRIPTION OF DRAWINGS

Some embodiments are illustrated by way of example and not limitation inthe figures of the accompanying drawings in which:

FIG. 1 illustrates a diagrammatic representation of a customerestablishing a line of service, according to an example embodiment.

FIG. 2 illustrates a flowchart of the process of provisioning a line ofservice for a customer, according to an example embodiment.

FIG. 3 illustrates a diagrammatic representation of a user using aterminal device to request a webpage from a web server, according to anexample embodiment

FIG. 4 illustrates a flowchart of the process of responding to a pagerequest, according to an example embodiment.

DETAILED DESCRIPTION

In the following description, for purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of some example embodiments. It will be evident, however,to one skilled in the art that the present invention may be practicedwithout these specific details.

In order to collect the data for analytics of a website the owner ormanager (referred to as a customer herein) of the website may include atracking code on each webpage of the website. When this code is renderedby a browser of a user, the tracking code will be executed and collectthe necessary analytics. In some examples, the tracking code will senddata to a tracking system server that is separate from the web serverthat hosts the website. A tracking code may include an identification ofan account of the customer that is sent to the tracking system toassociate any analytics data with the customer.

In an example setup of a website, an owner of the website may go throughthe process described herein. While the following example lists severalentities such as domain registrar, website hosting server, and trackingsystem server, one or more companies may manage all of the entities.Additionally, other people associated with owner (e.g., employees) maycomplete the below steps.

In an example, a customer purchases a domain, such as “example.com,”from a domain registrar. The customer may then contract with a hostingcompany to host the customer's website. The customer may then create,manually or through a wizard process, one or more webpages and uploadthem to the web hosting company. In other words, when a user connects to“example.com” via a browser, the hosting company will serve the webpagesof website to the user's computer.

If the customer wishes to have analytics tracking on his or her website,the customer may also establish an account with a tracking system. In anexample, the tracking system generates a tracking code and instructs theowner to place the tracking code on each of the webpages the owner wantsto collet analytics data on. The tracking code may include a customeridentification of the customer so the tracking system can associate anyreceived analytics data with the customer. The tracking code may alsoinclude a link to a script that, when run, collects the analytics data.

Many people that create a website use automated tools and websitebuilders to generate their website as they often do not know how to codea website. As such, many people are unable to edit their website toinclude the tracking code because of the automated nature of thewebsite's creation or lack of technical knowledge. Thus, many websiteowners are not able to easily obtain analytics associated with the useof their website.

Described herein is an example solution to the problem of enabling webanalytics at the time of domain and hosting registration with limiteduser interaction. For example, upon a customer establishing a line ofservice (e.g., hosting a website) with a web hosting company, thehosting company may transmit a request to a tracking system server toestablish a tracking account with the tracking system. The trackingsystem may respond to the hosting company with a customer identificationand tracking code format to insert into the customer's webpages. Thehosting company may generate a configuration file that includes at leastthe customer identification and store the configuration file in thepublic folder of the domain on a web server. Then, when a request for awebpage on the domain of the customer is received at the web server, theweb server may generate an analytics tracking code using the format ofthe tracking system and customer identification and insert the trackingcode into the webpage before transmitting it back to the requestingdevice.

In addition to making setting up analytics tracking simple for acustomer, there is an added benefit that switching tracking systembecomes a simple task. For example, the hosting company may decide thata different tracking system provides additional or better implementedfeatures. Thus, the hosting company may establish accounts for acustomer with the new tracking system and update the configuration fileof the customer to include a new customer identification. In variousexamples, more than one tracking system may be used for each customer.

FIG. 1 illustrates a diagrammatic representation of a customerestablishing a line of service, according to an example embodiment. FIG.1 illustrates customer 102, sales user 104, support user 106, network108, hosting data center 110, and provisioning server 112. Thecomponents illustrate in FIG. 1 may interact via one or more networkssuch as network 108. Hosting data center 110 and provisioning server 112may each include at least one computer with at least one processor. Theat least one processor may execute instructions stored on a storagedevice of the at least computer which configure the at least oneprocessor to perform the operations described herein.

Network 108 may include local-area networks (LAN), wide-area networks(WAN), wireless networks (e.g., 802.11 or cellular network), the PublicSwitched Telephone Network (PSTN) network, ad hoc networks, personalarea networks (e.g., Bluetooth) or other combinations or permutations ofnetwork protocols and network types. Network 108 may include a singlelocal area network (LAN) or wide-area network (WAN), or combinations ofLAN's or WAN's, such as the Internet. The various devices coupled tonetwork 108 may be coupled to network 108 via one or more wired orwireless connections.

In an example, customer 102 may be a person that is establishing a lineof service (e.g., web site hosting) with a hosting company representedin part by hosting data center 110. Sales user 104 and support user 106may be employees of the hosting company that interact (e.g.,telephonically, electronic messaging, etc.) with customer 102 toestablish the line of service. For example, hosting data center 110 mayinclude a setup application that sales user 104 access to establish theline of service for customer 102. Hosting data center 110 may also servean interface (e.g., webpage) to user 102 that is configured to receiveinput from user 102 to establish the line of service.

In an example, customer 102 accesses hosting data center 110 via a userterminal. A user terminal may be a personal computer or mobile device.In an embodiment, user terminal includes a client program to interfacewith hosting data center 110. The client program may include commercialsoftware, custom software, open source software, freeware, shareware, orother types of software packages. In an embodiment, the client programincludes a thin client designed to provide query and data manipulationtools for a user of the user terminal. The client program may interactwith a server program hosted by, for example, hosting data center 110,to establish a line of service.

In an example, establishing a line of service with hosting data center110 includes obtaining information from customer 102. For example,billing information and an account identification may be established forthe customer. Furthermore, customer preferences with respect toanalytics for the customer's website may be determined. For example,basic analytics may include geographic (e.g., based on the IP address ofa request) and temporal (e.g., what time of day requests most frequentlyoccur) analytics regarding visitors to the customer's website. Morecomplex analytics may include heat map data that infers where a visitoris looking on the website based on cursor data or other measurable dataof the visitor. Customer 102 may indicate what type of analytics thecustomer wants for his or her website during the service provisioning.As indicated above, the preferences of the user may be received via awebpage or interaction with employees of the hosting company.

In an example, hosting data center 110 transmits the data obtained fromcustomer 102 to provisioning server 112. While illustrated as multipleservers in FIG. 1, hosting data center 110 and provisioning server 112may be the same physical server or include multiple servers. The dataobtained may formatted in a standardized format (e.g., according to anXML schema) such that provisioning server 112 may parse the data.

FIG. 2 illustrates a flowchart of the process of provisioning a line ofservice for a customer, according to an example embodiment. For example,provisioning server 112 may use information received from hosting datacenter 110 that was obtained during a new line of service setup from acustomer.

In an example, at decision block 202 it is determined if a base productcode is present, at decision block 204 it is determined if theappropriate group bit has been set, at block 206 an account is createdon a tracking system, at block 408 a customer identification isretrieved, at block 210 a configuration file is created and stored inthe public folder of the domain, at block 212 the appropriate group bitis set, and at block 414 the regular service provisioning flow iscontinued.

In an example, at decision block 202 provisioning server 112 checks ifthe base product code is present. If base product code is a part of theoverall product code/SKU and is present in the product database in thatproduct definition, it may signal the provisioning server to create theassociated service and perform the necessary actions to create andconfigure its elements, accounts and applications. If the base productis present, flow continues to decision block 204. If the base productcode is not present, flow continues to the regular service provisioningflow at block 214.

In an example, at decision block 204, provisioning server 112 checks ifthe appropriate group bit has been set. Setting the bit in the grouppermissions of the directory (group bit) containing the domain files maysignal the web server that this domain is authorized for modificationand tracking code should be automatically inserted while serving itspages. If the appropriate group bit has been set, flow continues toblock 214 and regular service provisioning is resumed. If theappropriate group bit has not been set, flow continues to block 206.

In an embodiment, at block 206 an account is created at a trackingsystem for the customer. In various embodiments, the tracking system isrun on the same server as the provisioning server or hosting data centerservers. To create an account, provisioning server 112 may invoke one ormore Application Programming Interface (API) calls of the trackingsystem via network 108. The calls may take inputs of a customer name anddomain. In an embodiment, the inputs are encrypted in the API call. Inan embodiment, provisioning server 112 may execute a program stored atprovisioning server 112 to create the account when the tracking systemis part of the provisioning server.

Using the inputs, the tracking system may generate an account on thetracking system for the customer. In various embodiments, generating anaccount may include generating an entry in an account database stored atthe tracking system. The entry may include the customer's name and agenerated customer identification as well as the domain name that thecustomer has registered and is hosting with the hosting company.

In response to the account generation, the tracking system may return(e.g., transmit or route) the customer identification stored in theaccount database associated with the customer. The customeridentification may include one or more numbers, letters, or symbols(e.g., A123455). In addition to the customer identification, otherinformation may be transmitted back to the provisioning server. Forexample, a tracking campaign may be set up for the customer. A campaignmay define the period for analytics tracking. For example, a campaignmay run for three months. Therefore, a campaign identification may begenerated and transmitted back to the provisioning server. The campaignidentification may also be stored in an entry in the account databaseassociated with the customer.

In various examples, the customer may already have a generated accountat the tracking system. Thus, an account may not need to be generated atthe tracking system. However, the entry associated with the customer maybe updated to include the domain (e.g., if the customer has multipledomains) included in the API call. In an embodiment, a new entry iscreated that includes the customer's name, already generated customeridentification, and a domain. Thus, there may be multiple entries in theaccount database for a single customer. The data fields (e.g., name,domain) of the entries are for illustration purposes and more or fewerdata fields with different names may be used.

In an example, at block 208, a configuration file (illustrated as.wmcnum) is generated at the provisioning server for the customer andstored in the domain's public folder. The configuration file may beformatted according to a standardized format (e.g., XML) and include thecustomer identification and optionally the campaign identification asreceived from the tracking system.

In an embodiment, the configuration file is stored in the public folderof the customer's domain. For example, provisioning server 112 maydetermine which web server(s) of a plurality of web servers thecustomer's domain is to be hosted. Within the determined server(s) theremay be a file structure associated with the customer. For example, theremay be “cgi-bin” folder for the domain that stores interactive programssuch as Perl or JAVA® programs, a “conf” folder that storesconfiguration files, and an “htdocs” that stores the files served to arequesting computer device. In an embodiment, the “htdocs” folder is thecustomer's public folder. For example, consider an “index.html” filedstored in the “htdocs” folder. If a user's browser executing on acomputing device requests “http://www.example.com/index.html,” the“index html” may be transmitted from the hosting web server back to therequesting user's computing device. The names of the folders are forillustration purposes and may be changed.

In an example, at block 210, the appropriate group bit for the domain isset and at block 212 the regular service provisioning is continued. Thismay signal web server to insert the tracking code while serving thepages in the runtime.

FIG. 3 illustrates a diagrammatic representation of a user using aterminal device to request a webpage from a web server, according to anexample embodiment. FIG. 3 includes users 302, network 108, hosting datacenter 110, and web server 304, HTTP request 306, and page request 308.

In an embodiment, a user 302 uses a user terminal (e.g., personalcomputer) to request a webpage. For example, the user may use a browserand enter in a webpage address using an input device (e.g., mouse) ofthe user terminal. The webpage address may be for the domain of thecustomer. The request may be formatted as HTTP request 306 andtransmitted via network 108 to hosting data center 110. Hosting datacenter 110 may process the HTTP request to determine that web server 304handles the HTTP requests for the requested webpage domain (i.e., thedomain of the customer). Then, page request 308 may be made to retrievethe page associated with HTTP request 304 (e.g., index.html).

In an example, web server 304 is responsible for responding to HTTPrequests. For example, web server 304 may be run as an Apache webserver. The web server may access one or more files stored on the webserver or other locations and communicate the files back to a requestingdevice. In various embodiments, web server 304 may modify the filesbefore communicating the files using an Apache module. The files may berendered as user-interfaces on a browser of a requesting computingdevice. The files may be implemented using a variety of programminglanguages or programming methods, such as HTML (HyperText MarkupLanguage), VBScript (Visual Basic®, Scripting Edition), JavaScript™,XML® (Extensible Markup Language), XSL™ (Extensible Stylesheet LanguageTransformations), AJAX (Asynchronous JavaScript and XML), Java™, JFC(Java™ Foundation Classes), and Swing (an Application ProgrammingInterface for Java™). Web server 304 may include at least one computerwith at least one processor. The at least one processor may executeinstructions stored on a storage device of the at least computer whichconfigure the at least one processor to perform the operations describedherein.

FIG. 4 illustrates a flowchart of the process of responding to a pagerequest, according to an example embodiment. For example, web server 304may respond to HTTP request 306.

In an example, at decision block 402 it is determined if the group bitfor the domain is set, at decision block 404 it is determined if theconfiguration file is available, at decision block 406 it is determinedif the customer identification in the configuration file is valid, atblock 408 a tracking code is generated with the customer identificationinserted therein, at block 410 the page name is retrieved or extractedand inserted into the tracking code, at block 412 the group name isretrieved or extracted and inserted into the tracking code, at decisionblock 414 it is determined if a campaign identification is valid in theconfiguration file, at block 416 the campaign identification is insertedinto the tracking code, at decision block 418 it is determined if a heatmap feature is enabled, at block 420 a heat map section is inserted intothe tracking code, at block 422 the requested page is parsed and thetracking code is inserted, at block 424 the requested page istransmitted with the customized tracking code, and at block 426 anunmodified version the requested page is transmitted.

In an example, at decision block 402 it is determined if the group bitis set for the requested domain (e.g., example.com) by checking thedomain directory permissions. If the group bit has been set, flow maycontinue to decision block 404. If the group bit has not been set forthe domain, flow may continue at block 426.

In an example, at decision block 404 is determined if a configurationfile is available for the domain. For example, web server 304 may checkthe public folder of the domain for the configuration file. Theconfiguration file may have the same name across domains even though thecontents may differ. For example, the configuration file may be named“.trackingconf.” Thus, web server 304 may perform a check for the“.trackingconf” in the public folder for the domain. If theconfiguration file is available, flow may continue to decision block406. If the configuration file is not found, flow may continue at block426.

In an example, at decision block 406, it is determined if a customeridentification in the configuration file is valid. For example, webserver 304 may issue an API call to the tracking system to determine ifthe customer identification in the configuration file exists, and if theidentification is associated with the requested domain. If the customeridentification is valid, flow may continue at block 408. If the customeridentification is not valid or does not exist, flow may continue atblock 426.

In an example, at block 408 an analytics tracking code (tracking code)is generated and the customer identification is inserted into thetracking code. In various embodiments the tracking code is a JavaScriptcode with one or more customizable fields related to analytics tracking.A template of the tracking code may be stored and used as the basis forthe generation. The template may be received form the tracking system.The fields may be customized based on the information in theconfiguration file. Similarly, new fields may added and existing fieldsmay be removed as necessary for customizing the tracking code. Forexample, the code template may be the following:

<!—Tracking Code START --> <script type=‘text/javascript’src=‘https://acmetrackingsystem.com/track.js’></script> <scripttype=‘text/javascript’><!-- cust_id=‘13aa26eac3508d3f’; //identification from config. file page_name=‘index.html’; //page namegroup_name=‘group name’; campaign_id=‘campaign_id’; // campaign if anyfrom the config. file // --> </script> <!—Tracking Code END -->

At block 410, in an example, a page name is retrieved or extracted andinserted into the tracking code. For example, the page name may bedetermined by examining the HTIP request. The “page_name” field may beupdated to reflect the page name of the request.

At block 412, in an example, the group name is retrieved from the URL orextracted from configuration file and inserted into the tracking code.

At decision block 414, it is determined if a campaign identification inthe configuration file is valid. For example, web server 304 may issuean API call to the tracking system to determine if the campaignidentification in the configuration file exists, and if theidentification is associated with the requested domain. If the campaignidentification is valid, flow may continue at block 416 where thecampaign identification is inserted into the tracking code. If thecustomer identification is not valid or does not exist, flow maycontinue at decision block 418.

At decision block 418, in an example, it is determined if the heat mapfeature has been enabled. For example, an API call may be made to thetracking system using the customer identification to determine whichanalytic features have been enabled. In an example, the determination ismade by issuing a call to the hosting data center. In yet anotherexample, the configuration file may include which features are enabled.Similarly, other analytic features beyond a heat map may also be checkedfor. If the heat map feature has been enabled, flow may continue toblock 420 where the necessary code may be generated and inserted intothe tracking code to enable heat map tracking. If the feature has notbeen enabled, flow may continue to block 422.

In an example, at block 422, the requested page is parsed and thegenerated tracking code is inserted into the HTML of the requested page.For example, the requested page (e.g., index.html) may be retrieved froma storage device of web server 304. The requested page may be opened andparsed to determine a place for the generated tracking code. In variousexamples, the structure of a webpage includes various sectionsidentified by tags. For example, an HTML may include a “head” sectionidentified by <head> and closed by </head> and a “body” sectionidentified by <body> and closed by </body>. Depending on the trackingsystem, the tracking code may be placed in different places of thewebpage. For example, the tracking system may instruct the web server toplace the tracking code after all other content but before the </body>closing tag. At block 422 the tracking code may be placed according tothe preference of the tracking system. The preference may be indicatedin the configuration file or be set in an Apache module.

At block 424, in an example, the modified webpage with the insertedtracking code customized according to the process above is transmittedback to the requesting device. If the answer to decision blocks 402,404, or 406 was “no,” the unmodified webpage may be transmitted back tothe requesting device at block 426.

Although an embodiment has been described with reference to specificexample embodiments, it will be evident that various modifications andchanges may be made to these embodiments without departing from thebroader spirit and scope of the invention. Accordingly, thespecification and drawings are to be regarded in an illustrative ratherthan a restrictive sense. The accompanying drawings that form a parthereof, show by way of illustration, and not of limitation, specificembodiments in which the subject matter may be practiced. Theembodiments illustrated are described in sufficient detail to enablethose skilled in the art to practice the teachings disclosed herein.Other embodiments may be utilized and derived therefrom, such thatstructural and logical substitutions and changes may be made withoutdeparting from the scope of this disclosure. This Detailed Description,therefore, is not to be taken in a limiting sense, and the scope ofvarious embodiments is defined only by the appended claims, along withthe full range of equivalents to which such claims are entitled.

What is claimed is:
 1. A method comprising: receiving at a web server,from a requesting computing device, a webpage access request associatedwith a domain; in response to receiving the webpage access request:accessing a configuration file for the domain; generating an analyticstracking code based on data stored in the configuration file; accessingthe webpage from a storage device; modifying the webpage to include theanalytics tracking code; and transmitting, from the web server, themodified webpage to the requesting computing device.
 2. The method ofclaim 1, wherein generating the analytics tracking code comprises:retrieving a customer identification from the configuration file;validating the customer identification; and inserting the customeridentification into the analytics tracking code.
 3. The method of claim1, wherein generating the analytics tracking code comprises: based ondetermining that heat map analytics are enabled for the domain:generating heat map analytics code; and inserting the heat map analyticscode into the analytics tracking code.
 4. The method of claim 1, whereinmodifying the webpage to include the analytics tracking code comprises:parsing the webpage to identify a placement for the analytics trackingcode.
 5. The method of claim 1, comprising: determining that the domainhas been authorized for modification before modifying the webpage. 6.The method of claim 1, wherein the analytics tracking code is notgenerated before the webpage access request.
 7. The method of claim 1,wherein generating the analytics tracking code comprises: retrieving acampaign identification from the configuration file associated with ananalytics campaign; validating the campaign identification; andinserting the campaign identification into the analytics tracking code.8. A method comprising: provisioning a domain on a web server;transmitting a request to establish an account at a tracking server forthe domain; retrieve a customer identification from the tracking serverfor the domain; storing a configuration file for the domain on the webserver, the configuration file including the customer identification;generating an analytics tracking code based on data stored in theconfiguration file when a webpage is requested, from a computing device,associated with the domain; and inserting the analytics tracking codeinto the webpage before transmitting the webpage to the computingdevice.
 9. The method of claim 8, further comprising: storing a campaignID in the configuration file.
 10. The method of claim 8, comprising:authorizing tracking analytics for the domain.
 11. The method of claim8, wherein generating an analytics tracking code includes generating ananalytics tracking code with the customer identification inserted intothe analytics tracking code.
 12. The method of claim 8, comprising:storing a preference for a type of analytics in the configuration file.13. The method of claim 12, wherein generating the analytics trackingcode includes configuring the analytics tracking code to include heatmap analytics when the preference for the type of analytics includesheat map analytics.
 14. The method of claim 12, wherein storing theconfiguration file for the domain on the web server includes storing theconfiguration file in a public folder of the domain on the web server.